const Mock = require('mockjs');

Mock.mock('/api/data', (req, res) => {
    console.log(req);
    console.log(res);
    return {
        code: 200,
        data: [1, 2]
    }
});